package com.ktwlsoft.archivemanage.domain.business.repositoryService.businessInspectTem;

import java.util.List;

import com.ktwlsoft.archivemanage.domain.dao.entity.businessInspectTem.InspectTemSubject;
import org.springframework.stereotype.Service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.ktwlsoft.archivemanage.domain.dao.repository.businessInspectTem.IInspectTemSubjectMapper;

/**
 * inspect_tem_subject--指导模板题目业务层接口实现类
 *
 * @author zhuhe on 2019-11-06 15:56:31
 * @version 1.0
 */
@Service
public class InspectTemSubjectRepositoryService {
	
	private final IInspectTemSubjectMapper InspectTemSubjectMapper;

	public InspectTemSubjectRepositoryService(IInspectTemSubjectMapper InspectTemSubjectMapper) {
		this.InspectTemSubjectMapper = InspectTemSubjectMapper;
	}

	/**
 	 * 查询分页 on 2019-11-06 15:56:31
 	 * @param pn 第几页
     * @param pageSize 每页多少条
 	 * @param inspectTemSubject inspectTemSubject
 	 * @return PageInfo<InspectTemSubject>
 	 */
	public PageInfo<InspectTemSubject> findPage(int pn, int pageSize, InspectTemSubject inspectTemSubject) {
		PageHelper.startPage(pn,pageSize);
		PageInfo<InspectTemSubject> pageInfo = new PageInfo<InspectTemSubject>(InspectTemSubjectMapper.findList(inspectTemSubject));
		return pageInfo;
	}

    /**
	 * 查询集合 on 2019-11-06 15:56:31
	 * @param inspectTemSubject inspectTemSubject
	 * @return List<InspectTemSubject>
	 */
	public List<InspectTemSubject> findList(InspectTemSubject inspectTemSubject) {
		return InspectTemSubjectMapper.findList(inspectTemSubject);
	}

    /**
	 * 根据ID查询信息 on 2019-11-06 15:56:31
	 * @param id	主键
	 * @return InspectTemSubject
	 */
	public InspectTemSubject getById(Long id){
		return InspectTemSubjectMapper.getById(id);
	}

   /**
	 * 新增 on 2019-11-06 15:56:31
	 * @param inspectTemSubject inspectTemSubject
	 * @return int
	 */
	public int insert(InspectTemSubject inspectTemSubject){
		return InspectTemSubjectMapper.insert(inspectTemSubject);
	}

	/**
	 * 批量插入 on 2019-04-23 10:57:02
	 * @param list list
	 * @return int
	 */
	public int manyInsert(List<InspectTemSubject> list){
		return InspectTemSubjectMapper.manyInsert(list);
	}

   /**
	 * 修改 on 2019-11-06 15:56:31
	 * @param inspectTemSubject inspectTemSubject
	 * @return int
	 */
	public int update(InspectTemSubject inspectTemSubject){
		return InspectTemSubjectMapper.update(inspectTemSubject);
	}

   /**
	 * 根据id集合批量删除信息 on 2019-11-06 15:56:31
	 * @param guidanceTemSubjectArr	主键编号集合
	 * @return int
	 */
	public int deleteByIds(List<Long> guidanceTemSubjectArr){
		return InspectTemSubjectMapper.deleteByIds(guidanceTemSubjectArr);
	}

   /**
	 * 根据id删除信息 on 2019-11-06 15:56:31
	 * @param id id
	 * @return int
	 */
	public int deleteById(Long id){
		return InspectTemSubjectMapper.deleteById(id);
	}
}
